package com.jinlong.common.mybatis;

import com.jinlong.untils.ReflectionUntils;
import org.apache.ibatis.jdbc.SQL;

import java.util.Map;

public class BaseProvider {

    public String save(Map<String,Object>map){
        //实体类
        Object oj = map.get("oj");
        //表名
        String table = (String) map.get("table");


        SQL sql =new SQL(){{
            INSERT_INTO(table);
            VALUES(ReflectionUntils.FatherAndSon(oj),ReflectionUntils.FatherAndSonValue(oj));
        }};
        return sql.toString();
    }
}
